﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace YArchitech.Revit.MEP.Opening
{
	public class DrivepipeFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			FamilyInstance familyInstance = elem as FamilyInstance;
			return familyInstance.Category.Id.IntegerValue == -2002000 && familyInstance.Symbol.Family.Name.Contains("套管");
		}

		public bool AllowReference(Reference reference, XYZ position)
		{
			return false;
		}
	}
}
